package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.FintechUserContact;
import com.appkubes.mall.core.po.FintechUserContactExample;
import com.appkubes.mall.core.po.FintechUserContactKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface FintechUserContactMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_contact
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechUserContactSqlProvider.class, method="countByExample")
    long countByExample(FintechUserContactExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_contact
     *
     * @mbg.generated
     */
    @DeleteProvider(type=FintechUserContactSqlProvider.class, method="deleteByExample")
    int deleteByExample(FintechUserContactExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_contact
     *
     * @mbg.generated
     */
    @Delete({
        "delete from fintech_user_contact",
        "where user_key = #{userKey,jdbcType=VARCHAR}",
          "and relation = #{relation,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(FintechUserContactKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_contact
     *
     * @mbg.generated
     */
    @Insert({
        "insert into fintech_user_contact (user_key, relation, ",
        "relative_name, relative_phone, ",
        "creator, create_time, ",
        "updater, update_time)",
        "values (#{userKey,jdbcType=VARCHAR}, #{relation,jdbcType=VARCHAR}, ",
        "#{relativeName,jdbcType=VARCHAR}, #{relativePhone,jdbcType=VARCHAR}, ",
        "#{creator,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updater,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(FintechUserContact record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_contact
     *
     * @mbg.generated
     */
    @InsertProvider(type=FintechUserContactSqlProvider.class, method="insertSelective")
    int insertSelective(FintechUserContact record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_contact
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechUserContactSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="relation", property="relation", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="relative_name", property="relativeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="relative_phone", property="relativePhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="creator", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updater", property="updater", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<FintechUserContact> selectByExampleWithRowbounds(FintechUserContactExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_contact
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechUserContactSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="relation", property="relation", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="relative_name", property="relativeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="relative_phone", property="relativePhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="creator", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updater", property="updater", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<FintechUserContact> selectByExample(FintechUserContactExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_contact
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "user_key, relation, relative_name, relative_phone, creator, create_time, updater, ",
        "update_time",
        "from fintech_user_contact",
        "where user_key = #{userKey,jdbcType=VARCHAR}",
          "and relation = #{relation,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="relation", property="relation", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="relative_name", property="relativeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="relative_phone", property="relativePhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="creator", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updater", property="updater", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    FintechUserContact selectByPrimaryKey(FintechUserContactKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_contact
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechUserContactSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") FintechUserContact record, @Param("example") FintechUserContactExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_contact
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechUserContactSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") FintechUserContact record, @Param("example") FintechUserContactExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_contact
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechUserContactSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(FintechUserContact record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_contact
     *
     * @mbg.generated
     */
    @Update({
        "update fintech_user_contact",
        "set relative_name = #{relativeName,jdbcType=VARCHAR},",
          "relative_phone = #{relativePhone,jdbcType=VARCHAR},",
          "creator = #{creator,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "updater = #{updater,jdbcType=VARCHAR},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP}",
        "where user_key = #{userKey,jdbcType=VARCHAR}",
          "and relation = #{relation,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(FintechUserContact record);
}